﻿@using Kevin.Shop.Business.SalesManagement.Enumerations
@using RiderShop.Mobile.Common.Component
@using Kevin.Shop.Business.SalesManagement.Components.Order
@model RiderShop.Mobile.Modle.MyAccount.OrderModel
@section title
{
我的订单
}
@section header
{
    <link href="~/Themes/RongJi/Style/base/css/account.css" rel="stylesheet">
}

<div id="equalize">
    @{
        Html.RenderPartial("MenuPartial");
    }
    <div class="col-right">
        <div class="wrapper-right">
            <header class="accountHeader">
                <i class="zhang"></i>
                <h2>我的订单</h2>
            </header>
            @if (Model.OrderList.Count == 0)
            {
                <div class="nothingHere">
                    <i class="fa fa-leaf"></i>
                    <p>~订单空空如也~</p>
                    <a href="~/" class="rjbtn rjbtnGreen">去逛逛</a>
                </div>
            }
            else
            {
                <div class="section">
                    <div class="order_list_filter">
                        <select name="" class="sele" id="orderType">
                            <option value="0">全部订单</option>
                            <option value="1">近一个月订单</option>
                            <option value="2">一个月前订单</option>
                            <option value="3">已取消订单</option>
                        </select>
                    </div>
                    <table class="order_list">
                      
                        <thead>
                            <tr>
                                <th>订单商品</th>
                                <th>订单金额</th>
                                <th>订单状态</th>
                                <th>付款状态</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody id="orderList">
                            @{
                                Html.RenderPartial("OrderListPartial", Model);
                            }
                        </tbody>
                    </table>
                    <div class="pageNavBottom">
                        <ul class="listPager">
                            <li class="disabled">共<strong>@Model.OrderTotlaCount</strong>笔订单</li>
                            <li class="disabled">共<strong id="orderTotlaPage">@Model.OrderTotlaPage</strong>页</li>
                            <li class="disabled">当前第<strong id="currentPage">1</strong>页</li>
                            <li class="item"><i class="fa fa-angle-double-left"></i> <a href="javascript:void(0)" id="fristPage">首页</a></li>
                            <li class="item"><i class="fa fa-angle-left"></i> <a href="javascript:void(0)" id="previousPage">上一页</a></li>
                            <li class="item"><a href="javascript:void(0)" id="nextPage">下一页</a> <i class="fa fa-angle-right"></i></li>
                            <li class="item"><a href="javascript:void(0)" id="lastPage">尾页</a> <i class="fa fa-angle-double-right"></i></li>
                        </ul>
                    </div>
                </div>
            }
        </div>
    </div>
</div>

<div id="cancelOrderWindow">
    <form id="cancelOrderForm" action="#" method="POST">
        <h3>取消订单</h3>
        <div class="modal-body">
            <div class="item">
                <label>订单号：</label>
                <input id="orderNumber" type="text" class="cmnTInput" disabled="disabled"> 
            </div>
            <div class="item">
                <label>请选择取消原因：</label>
                <select id="voidOrderType">
                    <option value="" selected="selected">请选择取消原因</option>
                    <option value="0">现在不想购买</option>
                    <option value="1">支付不成功</option>
                    <option value="2">商品价格较贵</option>
                    <option value="3">等待时间过长</option>
                    <option value="4">有商品缺货</option>
                    <option value="5">更换或添加新商品</option>
                    <option value="6">错误或重复下单</option>
                    <option value="7">其它原因</option>
                </select>
                <span class="require">*</span>
            </div> 
            <div class="item">
                <label>作废备注：</label>
                <textarea cols="40" rows="4" name="voidReason" id="voidReason" maxlength="40" placeholder="如果选择其它原因,请简要说明原因"></textarea>
            </div>
            <div class="btnGroup">
                <input type="button"   onclick="cancelOrder();" value="确定" class="rjbtn rjbtnGreen">
                <button class="rjbtn rjbtnGray cancel" type="button" onclick="javascript: $.fancybox.close();">关闭</button>
            </div>
        </div>
    </form>
</div>
@section footer
{
    <script src="~/Themes/RongJi/Style/base/js/account.orderlist.js"></script>
}